package com.yunchang.springboot.mapper.mwsfinance;

import com.yunchang.springboot.models.mwsfinance.FFbaCustomerReturn;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FFbaCustomerReturnMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FFbaCustomerReturn record);

    int insertSelective(FFbaCustomerReturn record);

    FFbaCustomerReturn selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FFbaCustomerReturn record);

    int updateByPrimaryKey(FFbaCustomerReturn record);

    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<FFbaCustomerReturn> selectByCreateTime(String time);


    /**
     * 根据时间和是否生成出入库明细数据获取对应的数据
     * @param returnDate
     * @param isInventoryDetails
     * @return
     */
    List<FFbaCustomerReturn> selectByReturnDateAndIsInventoryDetails(@Param("returnDate") String returnDate, @Param("isInventoryDetails") Integer isInventoryDetails);

    /**
     *  根据fFbaCustomerReturnList对象集合更新是否生成财务数据的状态
     * @param fFbaCustomerReturnList
     * @return
     */
    int updateIsInventoryDetailsByFFbaCustomerReturnList(@Param("fFbaCustomerReturnList") List<FFbaCustomerReturn> fFbaCustomerReturnList);
}